-- GENERATED SPELL FOR [Raging Construct] --


function spell0_27970(pUnit, Event) --@Arcing Smash,n/a--
pUnit:FullCastSpellOnTarget(28168,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27970', 520, 1)
end

function spell1_27970(pUnit, Event) --@Potent Jolt,Self--
pUnit:FullCastSpellOnTarget(51819,pUnit)
pUnit:RegisterEvent('Sorts_27970', 640, 1)
end

function spell2_27970(pUnit, Event) --@Potent Jolt,Self--
pUnit:FullCastSpellOnTarget(61514,pUnit)
pUnit:RegisterEvent('Sorts_27970', 570, 1)
end

function Sorts_27970(pUnit, Event)
local choix_sorts_27970 = math.random(0, 2)
if choix_sorts_27970 == 0 then
pUnit:RegisterEvent('spell0_27970', 1, 1)
end
if choix_sorts_27970 == 1 then
pUnit:RegisterEvent('spell1_27970', 1, 1)
end
if choix_sorts_27970 == 2 then
pUnit:RegisterEvent('spell2_27970', 1, 1)
end
end

function mob27970_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27970', math.random(1500, 3000), 1)
end

function mob27970_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27970_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27970_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27970, 1, 'mob27970_Action')
RegisterUnitEvent(27970, 2, 'mob27970_Leave')
RegisterUnitEvent(27970, 3, 'mob27970_Kill')
RegisterUnitEvent(27970, 4, 'mob27970_Die')
